﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companyGPMAnalysis.aspx.cs"
    Inherits="PeisongWeb.admin.companyGPMAnalysis" %>

<%@ Register Assembly="OpenFlashChart" Namespace="OpenFlashChart" TagPrefix="cc1" %>
<%@ Register TagName="top" Src="controls/top.ascx" TagPrefix="uc1" %>
<%@ Register TagName="menu" Src="controls/menu.ascx" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>企业毛利率分析 - 想购网长期采购物流配送系统</title>
    <!--#include file="style.inc"-->

    <script src="/app_common/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script src="../amstock/swfobject.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server" />
    <uc1:top ID="Top1" runat="server" />
    <uc2:menu ID="Menu1" runat="server" />
    <div id="admin-body">
        <h2 class="section-cms">
            企业毛利率分析
        </h2>
        <ext:Panel ID="Panel1" runat="server" Title="企业毛利率分析" BodyStyle="padding:5px 5px 0"
            Width="1120px" Frame="true" ButtonAlign="Center">
            <Body>
                <div id="admin_edit_content_search">
                    <ul>
                        <li style="width: 400px; margin-right: 5px;">
                            <label style="width: auto;">
                                企业名称</label>
                            <asp:DropDownList runat="server" ID="ddlCompany" DataTextField="company" DataValueField="companyId"
                                Width="325px">
                            </asp:DropDownList>
                        </li>
                        <li style="width: auto; margin-right: 5px;">
                            <asp:RadioButton runat="server" ID="radModeD" GroupName="Mode" />日
                            <asp:RadioButton runat="server" ID="radModeM" GroupName="Mode" Checked="true" />月
                        </li>
                        <li style="width: auto; margin-right: 5px">
                            <label>
                                年份</label>
                            <asp:DropDownList runat="server" ID="ddlYear">
                                <asp:ListItem Value="2009">2009</asp:ListItem>
                                <asp:ListItem Value="2010" Selected="True">2010</asp:ListItem>
                                <asp:ListItem Value="2011">2011</asp:ListItem>
                                <asp:ListItem Value="2012">2012</asp:ListItem>
                                <asp:ListItem Value="2013">2013</asp:ListItem>
                                <asp:ListItem Value="2014">2014</asp:ListItem>
                                <asp:ListItem Value="2015">2015</asp:ListItem>
                                <asp:ListItem Value="2016">2016</asp:ListItem>
                                <asp:ListItem Value="2017">2017</asp:ListItem>
                                <asp:ListItem Value="2018">2018</asp:ListItem>
                                <asp:ListItem Value="2019">2019</asp:ListItem>
                                <asp:ListItem Value="2020">2020</asp:ListItem>
                            </asp:DropDownList>
                        </li>
                        <li style="width: 160px;">
                            <label>
                                日期</label>
                            <ext:DateField ID="txtStartDt" runat="server" AllowBlank="true" ReadOnly="true" Width="100" />
                        </li>
                        <li style="width: 160px; margin-right: 10px;">
                            <label style="width: 25px">
                                至</label>
                            <ext:DateField ID="txtEndDt" runat="server" AllowBlank="true" ReadOnly="true" Width="100" />
                        </li>
                        <li style="width: auto; margin-right: 10px;">[<asp:LinkButton runat="server" ID="btnAnalysis"
                            Text="分析" OnClick="btnAnalysis_Click"></asp:LinkButton>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <span style="<%=power>=2?"": "display:none" %>">[<asp:LinkButton runat="server" ID="linkExport"
                                Text="导出Excel" OnClick="linkExport_Click"></asp:LinkButton>] </span></li>
                    </ul>
                </div>
            </Body>
        </ext:Panel>
        <p>
            &nbsp;</p>
        <div id="admin_list_content" style="width: 1120px;">
            <div runat="server" id="dv1" visible="false">
                <cc1:OpenFlashChartControl ID="OpenFlashChartControl1" runat="server" EnableCache="false"
                    Width="1120px" Height="350px" LoadingMsg="数据加载中...">
                </cc1:OpenFlashChartControl>
                <table cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                    <tr>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td style="color: Blue;">
                            <b>报表解读</b>
                        </td>
                    </tr>
                </table>
                <table cellpadding="0" cellspacing="0">
                    <tr class="header-row">
                        <th>
                            月份
                        </th>
                        <th>
                            进价
                        </th>
                        <th>
                            出价
                        </th>
                        <th>
                            毛利
                        </th>
                        <th>
                            毛利率
                        </th>
                    </tr>
                    <asp:Repeater ID="rpt_list" runat="server">
                        <ItemTemplate>
                            <tr id="m<%# DataBinder.Eval(Container.DataItem,"m") %>" class='<%# Container.ItemIndex%2==0? "row-alt":"alt"  %>'>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem,"m")%>
                                </td>
                                <td>
                                    <%#DataBinder.Eval(Container.DataItem,"totalIn","{0:F2}") %>
                                </td>
                                <td>
                                    <%#DataBinder.Eval(Container.DataItem,"totalOut","{0:F2}") %>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem,"gpm","{0:F2}")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem,"gpmRate","{0:F2}")%>%
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <tr style="background-color: #fff; color: #f00;">
                        <td>
                            小计
                        </td>
                        <td>
                            <asp:Literal runat="server" ID="lblSaleAmount" />
                        </td>
                        <td>
                            <asp:Literal runat="server" ID="lblSupplyAmount"></asp:Literal>
                        </td>
                        <td>
                            <asp:Literal runat="server" ID="lblGMP"></asp:Literal>
                        </td>
                        <td>
                            <asp:Literal runat="server" ID="lblAvgGPMRate"></asp:Literal>
                        </td>
                    </tr>
                </table>
            </div>
            <div runat="server" id="dv2" visible="false">
                <div id="flashcontent">
                </div>
                <asp:Literal runat="server" ID="scrptLayout" EnableViewState="false"></asp:Literal>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
